<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

/* 客户服务器前台，玩家使用，子域名路由 */

//Route::Group(['domain'=>'{domain}.'.config('conf.domain')],function ($domain){

    Route::get('/', 'Domain\HomeController@index')->name('server');
    Route::get('/config', 'Domain\HomeController@config');
    Route::get('/video', 'Domain\HomeController@video');
    Route::get('/client', 'Domain\HomeController@client');
    Route::get('/dlq', 'Domain\HomeController@dlq');
    Route::get('/rank', 'Domain\HomeController@rank');



    Route::Group(['prefix'=>'launcher'],function () {
        Route::get('', 'Domain\LauncherController@launcher');
        Route::get('/patchlist.txt', 'Domain\LauncherController@patchlist');
        Route::get('/patchtodel.txt', 'Domain\LauncherController@patchtodel');
        Route::get('/version.txt', 'Domain\LauncherController@version');
        Route::get('/news.txt', 'Domain\LauncherController@news');
        Route::get('/updates.txt', 'Domain\LauncherController@updates');
        Route::get('/realmlist.txt', 'Domain\LauncherController@realmlist');
        Route::get('/links', 'Domain\LauncherController@links');
    });

    Route::Group(['prefix'=>'user','middleware'=>'playerLogined'],function (){
        Route::get('/center', 'Domain\UserController@center');
        Route::get('/mall', 'Domain\MallController@index');
        Route::post('/mall/buy', 'Domain\MallController@buy')->name('mall.buy');
        Route::post('/mall/getData', 'Domain\MallController@getData');

        Route::get('/mallspell', 'Domain\MallSpellController@index');
        Route::post('/mallspell/getData', 'Domain\MallSpellController@getData');
        Route::post('/mallspell/getChar', 'Domain\MallSpellController@getChar');
        Route::post('/mallspell/buyPoint', 'Domain\MallSpellController@buyPoint');
        Route::post('/mallspell/buy', 'Domain\MallSpellController@buy');

        Route::post('/timeToMoney', 'Domain\UserController@timeToMoney');
        Route::post('/payForLevel', 'Domain\UserController@payForLevel');

        Route::get('/changePwd', 'Domain\UserController@changePwd');
        Route::post('/changePwd', 'Domain\UserController@changePwddo');

        Route::get('/logout', 'Domain\LoginController@logout');

        Route::get('levelUp/{id}','Domain\UserController@levelUp'); //玩家角色升级页面
        Route::get('levelUpDo','Domain\UserController@levelUpDo'); //生成订单
        Route::get('recharge','Domain\UserController@recharge');
        Route::post('rechargeDo','Domain\UserController@rechargeDo');


        Route::get('characters','Domain\UserController@characters');
        Route::post('getCharacters','Domain\UserController@getCharacters');
        Route::get('moneyLog','Domain\UserController@moneyLog');
        Route::get('recommend','Domain\RecommendController@index');

        Route::post('getSpellInfo', 'Domain\HomeController@getSpellInfo');
    });

    Route::get('/login', 'Domain\LoginController@login');
    Route::post('/login', 'Domain\LoginController@logindo');

    Route::get('/register', 'Domain\LoginController@register');
    Route::post('/register', 'Domain\LoginController@registerdo');



//});








